# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=acme.sh
pkgver=3.0.7
pkgrel=0
pkgdesc="ACME Shell script, an acme client alternative to certbot"
options="!check" # No testsuite
url="https://github.com/acmesh-official/acme.sh"
arch="noarch"
license="GPL-3.0-only"
depends="curl socat cmd:openssl"
source="$pkgname-$pkgver.tar.gz::https://github.com/acmesh-official/acme.sh/archive/$pkgver.tar.gz"

package() {
	install -dm755 "$pkgdir"/usr/share/acme.sh/deploy
	install -dm755 "$pkgdir"/usr/share/acme.sh/dnsapi
	install -dm755 "$pkgdir"/usr/share/acme.sh/notify
	install -dm755 "$pkgdir"/usr/bin

	install -m755 acme.sh "$pkgdir"/usr/share/acme.sh/
	install -m755 deploy/*.sh "$pkgdir"/usr/share/acme.sh/deploy/
	install -m755 dnsapi/*.sh "$pkgdir"/usr/share/acme.sh/dnsapi/
	install -m755 notify/*.sh "$pkgdir"/usr/share/acme.sh/notify/

	ln -s /usr/share/acme.sh/acme.sh "$pkgdir"/usr/bin/acme.sh
}

sha512sums="
83d080b461662bf2c5cfa9cb51aaf41d7f873f54908e2e5f94d7e3fe8e3f6953d73aafb66adc97455aa958f37c72ef77ba475c7d7cbb3ca3c5bbffb4937c4bae  acme.sh-3.0.7.tar.gz
"
